<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>心理健康管理</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/table.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script src="${ctx}/js/health/psychol.js" type="text/javascript"></script>
	<script src="${ctx}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script src="${ctx}/fusioncharts.com/javascript/FusionCharts.js" type="text/javascript"></script>
	<script type="text/javascript">
	
	$(document).ready(function(){
		
		/*$.getJSON('psychol!showStudentChart.action', function(json) {
			alert(json);
	     	var myChart = new FusionCharts("${ctx}/fusioncharts.com/flash/Pie3D.swf", "myChartId", "300", "150", "0", "0" );
	     	myChart.setDataXML(json);
	     	myChart.configure("ChartNoDataText", "暂无数据");
		    myChart.render("pochart");  
	    }); */
		show('${studentPieXml}',"Pie3D.swf","mychartId","pochart");
	});
	function show(xml,chartUrl,mychartId,id){
		var myChart = new FusionCharts("${ctx}/fusioncharts.com/flash/"+chartUrl, mychartId, "250", "150", "0", "0" );
	 	myChart.setDataXML(xml);
	 	myChart.configure("ChartNoDataText", "暂无数据");
	    myChart.render(id);  
	}
	</script>
</head>
<body>
<div style="font-family:Arial;font-size:15px;font-weight:bold;font-style:normal;align:left">当前位置：健康管理--心里健康管理</div>
	<form id="psycholForm" action="psychol!search.action" method="post">
	<input type="hidden" id="personId" name="personId" value="${personId}" />
	<div id="filter">
	<table width="70%" class="noborder">
	    <tr>
		     <td>问卷名称：<s:select name="surveyId" id="surveyId" style="width:150px" theme="simple"
									list="surveyList" listKey="key" listValue="value" /></td>
		     <td>起始时间：<input type="text" id="startDate" name="startDate" size="10" readonly="readonly" 
								 value="<s:date name='startDate' format='yyyy-MM-dd'/>"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/></td>
	    	 <td>结束时间：<input type="text" id="endDate" name="endDate" size="10" readonly="readonly" 
								 value="<s:date name='endDate' format='yyyy-MM-dd'/>"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/></td>
			<td><input type="submit" value="查询"></input></td> 
	   </tr>
    </table>
    </div>
	<p></p><p></p>
	<div id="content">
		<table width="95%" border="1" id="customers">
			<tr>
				<th>序号</th>
				<th>问卷名称</th>
				<th>问卷描述</th>
				<th>答题时间</th>
				<th>问卷结果</th>
				<th>操作</th>
			</tr>
			<s:iterator value="surveys">
			<tr>
				<td>${id}&nbsp;</td>
				<td>${survey.name}&nbsp;</td>
				<td>${survey.description}&nbsp;</td>
				<td>${fillOutTime}&nbsp;</td>
				<td>${judgment}&nbsp;</td>
				<td>
					<a href="psychol!detail.action?resultSurveyId=${survey.id}&resultId=${id}&personName=${person.name}">明细</a>
				</td>
			</tr>
			</s:iterator>
		</table>
	</div>
	<table width="95%">
	<tr>
	<td width="60%">
	<fieldset title="" ><legend title="" align="top" >心里健康建议</legend>
	<ul id="suggestList">
	<s:iterator value="suggestList" >
	<li>${proposal}--${createDate}</li>
	</s:iterator>
	</ul>
	<br />
	</fieldset>
	</td>
	<td><div id="pochart"></div></td>
	</tr>
	</table>
	
</form>		
</body>
</html>